<link href="./css/style.css" rel="stylesheet" type="text/css" />
<div class="main">
<div class="goodlist">
	<p class="tt"><a>首页</a>><a href="agentlist.php">区域代理</a>><span>变更记录</span></p>
	<form class="search" action="?" style='line-height:40px;'>
		<p class="px" style='float:left; margin-right:15px;'><input type="text" name="uname" placeholder="请输入代理账户或姓名" /><input class="sousuo" type="submit" value="立即搜索" /></p>
	</form>
	<div class="list">
		{if($msg==1)}
		<table>
			<tr class="li1"><th>编号</th><th>代理账户</th><th>代理级别</th><th>代理区域</th><th>添加时间</th><th>结束时间</th></tr>
			{loop $glist $key as $list}
			<tr>
				<td>{$list[Id]}</td>
				<td>{$list[uname]}[{$list[tname]}]</td>
				<td>{$dlarr[$list[dllevel]]}</a></td>
				<td>{$list[area]}</td>				
				<td>{$list[addtime]}</td>				
				<td>{$list[endtime]}</td>				
			</tr>
			{/loop}
		</table>
		{$page}
		{else}
		<p class='none'>未查询到相关信息</p>
		{/if}
	</div>
	<script src="./js/jquery.js"></script>
	<script>
		$(".abtn3").on("click",function(){
			var id = $(this).attr("data-id");
			var msg = confirm("确认撤销代理？");
			if(msg==true){
				$.ajax({
					type:"post",
					dataType:"json",
					url:"/Moudel.php?m=m&a=agentcancel",
					data:"id="+id,
					success:function(d){
						if(d[0]==0){
							alert(d[1]);
						}else{
							alert(d[1]);
							window.location.href='agentlist.php';
						}
					}
				});
			}
		});
		
	</script>

</div>
</div>
<script>
	h1 = $(".main").height();
	h2 = $(".goodlist").height();
	if(h2>h1){
		$(".main").css("height","auto");
	}
	$('tr').click(function(){	
			$('tr').removeClass('onactive');
			$(this).addClass('onactive');
		});
</script>